/* 
 * File:   string.h
 * Author: bjorn
 *
 * Created on September 3, 2007, 9:03 PM
 */

#ifndef _ROPE_H
#define	_ROPE_H

#include "object.h"
#include "memory.h"

#ifdef	__cplusplus
extern "C" {
#endif

struct tagbstring;
struct bstrList;
typedef struct tagbstring   * Rope;
typedef struct bstrList     * Ropelist;

extern size_t rope_size(Rope self); 

extern const char * rope_c(Rope self); 

extern Rope rope_make(const char * str); 
extern Rope rope_make_join(const Rope self, const Rope other);

extern Rope rope_clone(Rope string);

extern Rope rope_free(Rope self); 

extern Rope rope_copy(Rope self, Rope target);

extern Rope rope_cat(Rope self, Rope other);

extern Rope rope_cat_c(Rope self, const char * other);

extern Ropelist ropelist_free(Ropelist self);

extern Ropelist ropelist_make(int size);

extern Ropelist rope_split_c(const Rope self, unsigned char splitchar);

extern Ropelist rope_split(const Rope self, const Rope splitstring);

extern Ropelist rope_split_any(const Rope self, const Rope splitstring);

extern Rope ropelist_get(const Ropelist self, int index);

extern Rope ropelist_set(const Ropelist self, int index, Rope value);

extern size_t ropelist_size(const Ropelist self);

extern Rope rope_format(const char * fmt, ...);


#ifdef	__cplusplus
}
#endif

#endif	/* _ERUTA_STRING_H */

